//
//  LoginViewController.m
//  Koala_Fm
//
//  Created by dllo on 16/1/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LoginViewController.h"
#import "RegViewController.h"
#import "UMSocial.h"
@interface LoginViewController ()<UMSocialUIDelegate>
#define W self.view.bounds.size.width/375
#define H self.view.bounds.size.height/667
@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor redColor];
//    self.navigationItem.title = @"用户登录";
    self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
    
    
    
    
    
    
    // 图标
    UIImageView  *picImage = [[UIImageView  alloc]initWithFrame:CGRectMake(145*W, 100*H, 80, 80)];
//    picImage.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:picImage];
    picImage.image = [UIImage imageNamed:@"kl"];
    [picImage release];
    
    
    //用户名
    UITextField *passText = [[UITextField alloc]initWithFrame:CGRectMake(40*W, 190*H, self.view.frame.size.width - 80, 30)];
    passText.backgroundColor = [UIColor redColor];
    [self.view addSubview:passText];
    passText.placeholder = @"请输入邮箱/手机号";
    [passText release];
    // 线
    UILabel *lineLable = [[UILabel alloc]initWithFrame:CGRectMake(40*W, 220*H, self.view.frame.size.width - 80, 1)];
    lineLable.backgroundColor = [UIColor blackColor];
    [self.view addSubview:lineLable];
    // 密码
    UITextField *userText = [[UITextField alloc]initWithFrame:CGRectMake(40*W, 240*H, self.view.frame.size.width - 80, 30)];
//    userText.backgroundColor = [UIColor yellowColor];
    userText.placeholder = @"输入密码";
    [self.view addSubview:userText];
    [userText release];
    //线
    UILabel *lineLableOne = [[UILabel alloc]initWithFrame:CGRectMake(40*W, 270*H, self.view.frame.size.width - 80, 1)];
    lineLableOne.backgroundColor = [UIColor blackColor];
    [self.view addSubview:lineLableOne];
    
    
    
    //登录按钮
    UIButton *button =[UIButton buttonWithType:UIButtonTypeCustom];
    button.backgroundColor = [UIColor redColor];
    button.frame = CGRectMake(40*W, 290*H, self.view.frame.size.width - 80, 30);
    [self.view addSubview:button];
    [button addTarget:self action:@selector(butt) forControlEvents:UIControlEventTouchUpInside];
    [button setTitle:@"登陆" forState:UIControlStateNormal];

    //注册按钮
    UIButton *logelButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    logelButton.backgroundColor = [UIColor whiteColor];
    logelButton.frame = CGRectMake(40*W, 330*H, 100*W, 20*H);
    [self.view addSubview:logelButton];
    [logelButton addTarget:self action:@selector(logonAction) forControlEvents:UIControlEventTouchUpInside];
    [logelButton setTitle:@"快速注册" forState:UIControlStateNormal];
    //密码找回按钮
    UIButton *passButton = [UIButton buttonWithType:UIButtonTypeCustom];
    passButton.frame = CGRectMake(self.view.frame.size.width - 140, 330*H, 100*W, 20*H);
//    passButton.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:passButton];
    [passButton addTarget:self action:@selector(passAction) forControlEvents:UIControlEventTouchUpInside];
    [passButton setTitle:@"找回密码" forState:UIControlStateNormal];
    //线
    UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(40, self.view.frame.size.height - 200, self.view.frame.size.width - 80, 2)];
    lable.backgroundColor = [UIColor blackColor];
    [self.view addSubview:lable];
    [lable release];
    
    //微信button
    UIButton *chatButton = [UIButton buttonWithType:UIButtonTypeCustom];
    chatButton.frame = CGRectMake(40*W, self.view.frame.size.height - 150, 50, 50);
//    chatButton.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:chatButton];
    [chatButton addTarget:self action:@selector(chatAction) forControlEvents:UIControlEventTouchUpInside];
    [chatButton setImage:[UIImage imageNamed:@"weixin"] forState:UIControlStateNormal];
    //qq button
    UIButton *qqButton = [UIButton buttonWithType:UIButtonTypeCustom];
    qqButton.frame = CGRectMake(self.view.frame.size.width - 90, self.view.frame.size.height - 150, 50, 50);
//    qqButton.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:qqButton];
    [qqButton addTarget:self action:@selector(qqAction) forControlEvents:UIControlEventTouchUpInside];
    [qqButton setImage:[UIImage imageNamed:@"qq"] forState:UIControlStateNormal];
    // 微博
    UIButton *blogButton = [UIButton buttonWithType:UIButtonTypeCustom];
    blogButton.frame = CGRectMake(self.view.frame.size.width - 180,self.view.frame.size.height - 150, 50, 50);
//   blogButton.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:blogButton];
    [blogButton addTarget:self action:@selector(blogAction) forControlEvents:UIControlEventTouchUpInside];
    [blogButton setImage:[UIImage imageNamed:@"weibo"] forState:UIControlStateNormal];
    // 其他方式登录
    UILabel *otherLable = [[UILabel alloc]initWithFrame:CGRectMake(130*W, self.view.frame.size.height - 230, 150*W, 30*H)];
//    otherLable.backgroundColor = [UIColor cyanColor];
    otherLable.text = @"其它登录方式";
    [self.view addSubview:otherLable];
    [otherLable release];
}
// 登录
- (void)butt{
    
    
    
}
// 注册
- (void)logonAction{
    RegViewController *reg = [[RegViewController alloc]init];
    [self.navigationController pushViewController:reg animated:YES];
}
//找回
- (void)passAction{
    
    
}
// 微信
- (void)chatAction{
    
}
// 微博
- (void)blogAction{
    
}
//qq
- (void)qqAction{
    
    
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
